<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户编辑</title>
    <#assign path="${springMacroRequestContext.getContextPath()}">
    <link rel="stylesheet" href="${path}/layui/css/layui.css" media="all">
</head>
<body>
<form class="layui-form" action="" id="ajaxForm">
    <br>
    <br>
    <input type="text" name="userId"  value=${user.userId} hidden>
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-block">
            <input type="text" name="userName" lay-verify="title" autocomplete="off" placeholder="请输入用户名"
                   class="layui-input" required style="width: auto;"  value="${user.userName}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-block">
            <input type="password" name="userPassword" lay-verify="title" autocomplete="off" placeholder="请输入用户密码"
                   class="layui-input" required style="width: auto;" value="${user.userPassword}" >
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">真实姓名</label>
        <div class="layui-input-block" style="width: 186.4px;">
            <input type="text" name="userTrueName" lay-verify="title" autocomplete="off" placeholder="请输入用户真实姓名"
                   class="layui-input" required style="width: auto;" value="${user.userTrueName}"  >
        </div>
    </div>
    <div class="layui-form-item" style="width: 300px">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block" >
            <select name="sex" lay-verify="required">
                <#if user.sex == "男">
                <option value="男">男</option>
                <option value="女">女</option>
                <#else>
                <option value="女">女</option>
                <option value="男">男</option>
            </#if>
            </select>
        </div>
    </div>
    <div class="layui-form-item" style="width: 300px">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block" >
            <select name="userType" lay-verify="required">
                <#if user.userType == 0>
                <option value="0">管理员</option>
                <option value="1">普通用户</option>
                <#else>
                <option value="1">普通用户</option>
                <option value="0">管理员</option>
            </#if>
            </select>
        </div>
    </div>
</form>
<script src="${path}/layui/layui.js"></script>
<script>
    layui.use('form', function () {
        var form = layui.form;
        form.render();
    });
</script>
</body>
</html>